#pragma once

#include <unordered_map>
#include "memory_allocator.hpp"
#include "ned_pool.hpp"

namespace cpac
{

	// Custom unordered_map template.
	//--------------------------------------
	// Usage is cpac::unordered_map<int, int>::type int_unordered_map;
	// This container specifies a default allocator for us, but we could of course
	// pass it another one if we need to.
	template
        <
            typename _Key, 
            typename _Type, 
            class    _Hash      = std::hash< _Key >, 
            class    _Compare   = std::equal_to< _Key >, 
            typename _Allocator = cpac::allocator_stl< std::pair< _Key, _Type >, cpac::ned_pooling_policy > 
        > 
	struct unordered_map 
	{
		typedef std::tr1::unordered_map< _Key, _Type, _Hash, _Compare, _Allocator > type;
	};
	//--------------------------------------

	// Custom unordered_multimap template.
	//--------------------------------------
	// Usage is cpac::unordered_multimap<int, int>::type int_unordered_multimap;
	// This container specifies a default allocator for us, but we could of course
	// pass it another one if we need to.
	template
		< 
			typename _Key, 
			typename _Type, 
			class    _Hash      = std::hash< _Key >, 
			class    _Compare   = std::less< _Key >, 
            typename _Allocator = cpac::allocator_stl< std::pair< _Key, _Type >, cpac::ned_pooling_policy > 
		> 
	struct unordered_multimap 
	{
		typedef std::tr1::unordered_multimap< _Key, _Type, _Hash, _Compare, _Allocator > type;
	};
	//--------------------------------------
}
